package com.qiudaozhang.loveblog.mongo;

import com.qiudaozhang.loveblog.entity.Book;
import org.springframework.data.mongodb.repository.MongoRepository;

/**
 * @author 邱道长
 * 2019/11/14
 */
public interface BookRepository extends MongoRepository<Book,String> {

    /**
     * 根据用户ID和书名唯一确定书
     * @param userId
     * @param name
     * @return
     */
    Book findBookByUserIdAndName(Long userId,String name);


}
